package com.hdaccp.user.controller;

import com.hdaccp.pojo.po.User;
import com.hdaccp.user.dao.UserDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    private UserDao userDao ;
    @RequestMapping("/getOne/{id}")
    public User getOne(@PathVariable("id") int userId){
        return userDao.findById(userId).get() ;
    }

}
